<template>
  <div class="header-wrap">
    <!-- <div class="header-tourl-left">
      <div class="head-box cur" :class="{ 'head-box-active': headActive == '页面二' }" @click="handleClick('页面二')">
        页面二
      </div>
      <div class="head-box cur" :class="{ 'head-box-active': headActive == '页面三' }" @click="handleClick('页面三')">
        页面三
      </div>
    </div>
    <div class="header-title" v-if="headActive == '页面二'">发电行业煤炭消费监测分析</div>
    <div class="header-title" v-if="headActive == '页面三'">非电行业煤炭消费监测分析</div> -->
    <div class="header-title">发电行业煤炭消费监测分析</div>
  </div>
</template>
<script>
import { defineComponent, ref, onMounted, onUnmounted } from 'vue'
export default defineComponent({
  data() {
    return {
      selectedName: '',
      headActive: '页面二'
    }
  },
  props: {
    title: {
      type: String,
      default: ''
    }
  },
  created() {},
  methods: {
    handleClick(name) {
      this.headActive = name
      if (name == '页面二') {
        this.$emit('headerData', 'pageTwo')
      } else if (name == '页面三') {
        this.$emit('headerData', 'pageThree')
      }
    }
  }
})
</script>

<style lang="scss" scoped>
.header-wrap {
  width: 15360px;
  height: 466.66px;

  .header-title {
    width: 1196px;
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 1);
    font-size: 120px;
    letter-spacing: 16.66666603088379px;
    font-family: YouSheBiaoTiHei;
    text-align: center;
    white-space: nowrap;
    line-height: 326px;
    margin: 0 auto;
  }

  .header-tourl-left {
    display: flex;
    margin-top: 64px;
    position: absolute;
    left: 5665px;
  }

  .head-box {
    width: 427px;
    height: 128px;
    // background-image: url("~@/assets/images/header-btn-bg.png");
    background: #28d7e2;
    background-size: 641px 155px;
    margin-right: 80px;
    font-family: YouSheBiaoTiHei;
    font-size: 52px;
    color: #ffffff;
    line-height: 128px;
    letter-spacing: 2px;
    text-align: center;
    opacity: 0.8;
  }

  .head-box-active {
    // background-image: url("~@/assets/images/header-btn-active.png");
    background-size: 658px 163px;
    font-size: 60px;
    // margin-top: 22px;
    opacity: 1;
    line-height: 110px;
  }
}
</style>
